
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">
<!--
.STYLE1 {font-size: 24px}
.STYLE2 {font-size: 70px}
.STYLE7 {font-size: smaller}
.STYLE6 {font-size: medium}
-->
</style>
 	
	<!-- start about us -->
		<?php
		//初始化模板参数:$this->aboutusTitle、$this->aboutusTitleImg
		$this->aboutusTitle = 
		'近期活动旨在更为直观的汇总近期学校内将要举办的各类讲座比赛，
		消息来源于教务处、校团委以及青春广场上的各类通知';
		$this->aboutusTitleImg = $this->baseUrl().'/images/recentactTitleImg.jpg';
		
		$aboutusLayout = new Zend_Layout();
		echo $aboutusLayout->render('/module/aboutus');
		?>
	<!-- end about us -->
	
	<!-- start logos -->
	<div class="logos">
		
	</div>
	<!-- end logos -->
	
	<!-- start content -->
	<div id="vg-content">

		<!-- start portfolio details -->
		<div id="portfolio-details" class="vg-page">
		
			<!-- start details -->
			<?php
//				左侧信息
				$this->fromhref = '?fromhref=/recentact/index';
				if($this->isloggin==true)
				{
					$userinfoLayout = new Zend_Layout();
					echo $userinfoLayout->render('/module/userinfo');
				}
				else
				{
					//左侧登录
					
					$loginLayout = new Zend_Layout();
					echo $loginLayout->render('/module/login');
				}  
			?>
			<article class="border-top c-four height-auto">
			
				<div class="vg-item-article vg-portfolio-details">
	
				<div class="detailblock">
				<h1 align="center"><?php echo $this->escape($this->act['title']);?></h1>
				<?php 
					$countgood = $this->act['countgood'];
					$countsoso = $this->act['countsoso'];
					$countbad = $this->act['countbad'];
					$countall = $countgood + $countsoso + $countbad;
					
					
					$html = '<h4>好评:'. '('.$countgood.'人)';
					if($countall==0)
					    $html.= 0; 
					else $html.= round((floatval($countgood))/$countall * 100).'%';
					$html .= '一般:('.$countsoso.'人)';
					if($countall==0)
					    $html .= 0;
					else $html .= round((floatval($countsoso))/$countall * 100).'%';
					$html .= '差评:('.$countbad.'人)';
					if($countall==0)$html .= 0; 
					else $html .=round((floatval($countbad))/$countall * 100).'%';
					$html .= '</h4>'; 
					if(isset($this->showVote)&&$this->showVote)
					{
						echo $html;
					}
				?>
				
				
				<p>
				<?php //echo $this->escape($this->act['content']);
					echo $this->act['content'];
				?>
				</p>
				<?php
 				if($this->isAdmin)
				{
					echo '<h4><a href="javascript:onDelete();">删除</a></h4>';
				} 
				?>
				<?php
					$formhtml = '<form action="'.$this->baseUrl().'/recentact/detail?actid='.$this->act['id'].'" method="post">';
					$formhtml .= '<h4>我来投一票：
					<input type="radio" id="gratitude" name="gratitude" value="countgood" />很好
					<input type="radio" id="gratitude" name="gratitude" value="countsoso" checked="checked"/>一般
					<input type="radio" id="gratitude" name="gratitude" value="countbad" />较差
					<button type="submit">投票</button>
					</h4>
					</form>';
					if(isset($this->showVote)&&$this->showVote)
					{
						echo $formhtml;	    
					} 
				?>
				
				
				</div>
					<!-- title -->
					<!-- end title -->
					<!-- upload start -->
					<!-- upload ends -->
					<!-- download list -->
					
					<!-- enddownload list -->
					<!-- pager start -->
					
					<!-- pager end -->
			  </div>
				
			</article>
			<!-- end details -->
			
	  </div>
	  <!-- end portfolio details -->
		
	</div>
	<!-- end content -->

<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-23864149-2']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();
  function searchEnter(){
	if(event.keyCode==13){
		document.getElementById('searchform').submit();
		return false;
	}  
  }
</script>

<script type="text/javascript">
	function onDelete()
	{
		if(confirm("确定删除?"))
		{
			window.location.href="<?php echo $this->baseUrl().'/recentact/delete?actid='.$this->act['id'];?>"; 
		}
		else
		{
		
		}
	}
</script>